{% extends "base.html" %}
{% block title_descn %}热门图片{% endblock %}


{% block middle %}

    <div class="row-fluid">
        <div id="content" class="span11 offset1">

            <div>
<h3> <span class="badge badge-info">热门图片</span></h3>
            </div>

            <br/>

	<ul class="thumbnails">
    {% for o in object_list %}
        <li class="thumbnail" style="width:140px;height: 140px">
                  <div>
                      <div>标题： <span>{{o.title}}</span>
            <a href="/photos/{{o.id}}/">
            <img class="img-polaroid" src="{{o.get_photo_url}}" alt="{{o.title}}"></a>
                  <br>
                  <a>浏览({{o.view_count}})</a> | <a>回复({{o.rep_count}})</a>
                  </div>
        </li>
    {% endfor %}	
	</ul>

</div>
        </div>


      <div class="raw-fluid">
            <div class="span4 offset4">

	<form method="get" name="pform" action="">
	<div id="pagination" style="float:right">
		<a>{{page}}/{{pages}} 页</a>
		<div class="input-append">
        <input name="page" size="4" maxlength="255" value="1" id="pg" type="text">
		<button class="btn" onclick="document.pform.submit(); return false;">GO</button>
            </div>
	</div>

	<div id="pagination">
		{% if has_previous %}
			<a href="/allhotphotos/?page=1">首页</a>
			<a href="/allhotphotos/?page={{ previous }}">上一页</a>
		{% endif %} {% if has_next %}
			<a href="/allhotphotos/?page={{ next }}">下一页</a>
			<a href="/allhotphotos/?page={{pages}}">尾页</a>	
		{% endif %}
	</div>

    </form>
    </div>
          </div>
{% endblock %}
